#!/bin/bash

ROOT_PATH=/root


docker-compose down

cd ${ROOT_PATH}/zhucong-demo/master

chmod 777 -R data
# my.cnf不能是777权限
chmod 644 -R my.cnf

cd ${ROOT_PATH}/zhucong-demo/slave

chmod 777 -R data
# my.cnf不能是777权限
chmod 644 -R my.cnf

rm -rf ${ROOT_PATH}/zhucong-demo/master/data/*

rm -rf ${ROOT_PATH}/zhucong-demo/slave/data/*

cd ${ROOT_PATH}/zhucong-demo

docker-compose up -d
